<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改产犊记录')" />
	<th:block th:include="include :: select2-css"/>
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-ncCowsBirth-edit" th:object="${ncCowsBirth}">
            <input id="birthId" name="birthId" th:field="*{birthId}"  type="hidden">
			<div class="form-group">
				<label class="col-sm-3 control-label">发情时间：</label>
				<div class="col-sm-8">
					<input id="fqDate" data-format="yyyy-MM-dd" readonly="true" data-type="datetime" required name="fqDate" placeholder="请选择时间"
						   th:value="*{#dates.format(fqDate, 'yyyy-MM-dd HH:mm:ss')}"
						   class="form-control" type="text" th:class="time-input"  >
				</div>

				<!--<div class="col-sm-8">
					<input id="fqDate" name="fqDate" th:field="*{fqDate}" class="form-control" type="text">
				</div>-->
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">配种时间：</label>
				<div class="col-sm-8">
					<input id="pzDate" data-format="yyyy-MM-dd" readonly="true"  data-type="datetime"  required name="pzDate" placeholder="请选择时间"
						   th:value="*{#dates.format(pzDate, 'yyyy-MM-dd HH:mm:ss')}"
						   class="form-control" type="text" th:class="time-input"  >
				</div>

				<!--<div class="col-sm-8">
					<input id="pzDate" name="pzDate" th:field="*{pzDate}" class="form-control" type="text">
				</div>-->
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">产犊时间：</label>
				<div class="col-sm-8">
					<input id="givebirthTime" data-format="yyyy-MM-dd" readonly="true" data-type="datetime" required name="givebirthTime" placeholder="请选择时间"
						   th:value="*{#dates.format(givebirthTime, 'yyyy-MM-dd HH:mm:ss')}"
						   class="form-control" type="text" th:class="time-input"  >
				</div>

				<!--<div class="col-sm-8">
					<input id="givebirthTime" name="givebirthTime" th:field="*{givebirthTime}" class="form-control" type="text">
				</div>-->
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">犊牛性别：</label>
				<div class="col-sm-8">
					<select id="childGender" class="form-control select2-multiple" name="childGender"
							th:with="type=${@dict.getType('childGender')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
								th:field="*{childGender}"></option>
					</select>
					<!--<input id="childGender" name="childGender" th:field="*{childGender}" class="form-control" type="text">-->
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">耳号：</label>
				<div class="col-sm-8">
					<input id="childCode" name="childCode" th:field="*{childCode}" class="form-control" type="number">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">犊牛体重：</label>
				<div class="col-sm-8">
					<input id="childWeight" name="childWeight" th:field="*{childWeight}" class="form-control" type="number" step="0.01">
				</div>
			</div>
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">更新时间：</label>
				<div class="col-sm-8">
					<input id="updateTime" data-format="yyyy-MM-dd HH:mm:ss" readonly="true" name="updateTime" placeholder="请选择时间"
						   th:value="*{#dates.format(updateTime, 'yyyy-MM-dd HH:mm:ss')}"
						   class="form-control" type="text" th:class="time-input"  >
				</div>

				&lt;!&ndash;<div class="col-sm-8">
					<input id="updateTime" name="updateTime" th:field="*{updateTime}" class="form-control" type="text">
				</div>&ndash;&gt;
			</div>-->
			<div class="form-group">
				<label class="col-sm-3 control-label">淘汰时间：</label>
				<div class="col-sm-8">
					<input id="eliminateTime" data-format="yyyy-MM-dd HH:mm:ss" readonly="true" name="eliminateTime" data-type="datetime"  placeholder="请选择时间"
						   th:value="*{#dates.format(eliminateTime, 'yyyy-MM-dd HH:mm:ss')}"
						   class="form-control" type="text" th:class="time-input"  >
				</div>

				<!--<div class="col-sm-8">
					<input id="eliminateTime" name="eliminateTime" th:field="*{eliminateTime}" class="form-control" type="text">
				</div>-->
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">淘汰原因：</label>
				<div class="col-sm-8">
					<input id="eliminateReason" name="eliminateReason" th:field="*{eliminateReason}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
				<textarea id="remark" name="remark" th:field="*{remark}" class="form-control" type="text" rows="4"></textarea>
				</div>
			</div>

		</form>
    </div>
    <div th:include="include::footer"></div>
	<th:block th:include="include :: select2-js"/>
    <script type="text/javascript">
		var prefix = ctx + "system/ncCowsBirth";
		$("#form-ncCowsBirth-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});

		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-ncCowsBirth-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
